<?php
function phptal_tales_money( $src, $nothrow )
{
    // remove spaces we do not require here
    $src = trim($src);
    return 'sprintf("%01.2f", '.phptal_tales($src, $nothrow).')';
}

function setCookieLive($name, $value='', $expire = 0, $path = '', $domain='', $secure=false, $httponly=false)
{
	$_COOKIE[$name] = $value;
   	return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
}

function removeCookieLive($name)
{
    unset($_COOKIE[$name]);
    return setcookie($name, NULL, -1);
} 

function arrayReplace(array $needle,array $haystack){
	//print_r($needle);
	//print_r($haystack);
	for ($i=0;$i<count ($haystack);$i++){
		for($j=0;$j<count($needle);$j++){
			if($haystack[$i][$needle[$j]['key']]==$needle[$j]['search'])
				$haystack[$i][$needle[$j]['key']]=$needle[$j]['replace'];
			//if($serach)
			//$array[$colum[$j]]=
		}
	}
	//print_r($haystack);
	return $haystack;
}